<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script type="text/javascript">
        /*
                                                                                                                var a = '123';
                                                                                                                console.log(a + '' + 12);
                                                                                                                console.log(a + 'haha');
                                                                                                                console.log(a - 12);
                                                                                                                */
        /*
        var a = 255;
        a = a.toString(2);
        console.log(a); //转换为二进制
        console.log(typeof a);
        */
        var test6 = new String(999);
        console.log(String(test6));
        console.log(typeof test6);
        var test6 = 999;
        console.log(String(test6));
        console.log(typeof test6);
    </script>
</body>

</html>